package design.pattern.工厂模式;

/**
 * 运算类
 */
public abstract class Operation {
    private double numberA = 0;
    private double numberB = 0;

    Operation(double numberA, double numberB){
        this.numberA = numberA;
        this.numberB = numberB;
    }

    Operation(){}


    /**
     * 计算方法，获取最终结算结构
     * @return
     * @throws Exception
     */
    abstract double getResult() throws Exception;

    public double getNumberA() {
        return numberA;
    }

    public void setNumberA(double numberA) {
        this.numberA = numberA;
    }

    public double getNumberB() {
        return numberB;
    }

    public void setNumberB(double numberB) {
        this.numberB = numberB;
    }

}
